package com.yimi.policyservice.service.impl;

import com.yimi.policyservice.dao.report.ReportMapper;
import com.yimi.policyservice.dto.report.CityReport;
import com.yimi.policyservice.dto.report.CountReport;
import com.yimi.policyservice.dto.report.ProvinceReport;
import com.yimi.policyservice.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ReportMapper reportMapper ;

    @Override
    public CountReport getCountReport() {
        return reportMapper.getCountReport();
    }

    @Override
    public List<ProvinceReport> provinceReport() {
        return reportMapper.provinceReport();
    }


    @Override
    public CityReport cityReport() {
        CityReport cityReport = new CityReport();
        cityReport.setTotalCount(reportMapper.getCityCount());
        cityReport.setSocialCount(reportMapper.getSocialCityCount());
        cityReport.setAccfundCount(reportMapper.getAccfundCount());
        cityReport.setDisableCount(reportMapper.getDisAbleCityCount());
        return  cityReport ;
    }
}
